package com.lonely.web.controller.system;

import com.lonely.common.core.domain.TimeLine;
import com.lonely.common.core.domain.api.R;
import com.lonely.system.domain.dto.log.GetLogTimeLineDto;
import com.lonely.system.service.IBusinessLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author : 黄志标
 * @date: 2025/9/19 16:58
 * @description: 业务日志控制器
 */
@RestController
@RequestMapping("/systemManage/businessLog")
@Api(tags = "系统管理/业务日志")
public class BusinessLogController {

    @Autowired
    private IBusinessLogService businessLogService;

    /**
     * 获取业务日志时间线
     *
     * @param queryDto
     * @return
     */
    @PostMapping("/getLogTimeLine")
    @ApiOperation(value = "获取业务日志时间线")
    public R<List<TimeLine>> getLogTimeLine(@RequestBody @Validated GetLogTimeLineDto queryDto) {
        return R.data(this.businessLogService.getLogTimeLine(queryDto));
    }

}
